#!/bin/bash
cd /d/vc/UEStudio/src

# 设置编译器路径
export CB_ROOT="/c/Program Files/CodeBlocks"
export GCC_ROOT="$CB_ROOT/MinGW"
export PATH="$CB_ROOT:$GCC_ROOT/bin:$PATH"

# 设置 wxWidgets 环境变量
export WXWIN="D:\\vc\\wxWidgets-3.2.7"
export WX_CFG="gcc_dll\\mswu"
export WX_VER="3.2"
export WX_SUFFIX="u"
export WX_COMPILER="gcc"

# 设置库路径
export PATH="/d/vc/wxWidgets-3.2.7/lib:$PATH"

# 验证环境
echo "Using compiler:"
which g++
g++ --version

echo "Building UEStudio..."
codeblocks.exe --batch-build-notify --no-batch-window-close --build "CodeBlocks_wx30_64.workspace"
